package com.client;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;


/**
 * Created by Zhang on 2018/8/4.
 * springboot启动类
 */
  @SpringBootApplication
  @EnableEurekaClient
  @Controller
public class EurekaClientApplication {
    public  static  void main(String [] args){
         System.err.println("启动中....");
        SpringApplication.run(EurekaClientApplication.class,args);
        System.err.println("启动成功！");
    }
    @Value("${server.port}")
    String port;
    @RequestMapping("/helloService")
    @ResponseBody
    public String home() {
        return "hello world from port " + port;
    }


}
